﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bussiness.Service;

namespace Bussiness.View.BackEnd
{
    public partial class BC_DoanhThu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadData();
        }


        public void LoadData()
        {
            List<Product> list = new Product_Service().getAllStore();
            List<SizeProduct> listSize; 
            for (int i = 0; i < list.Count;i++ )
            {
                    listSize = new Product_Service().getListSizeByProductID(list[i].ID);
                    for (int j = 0; j < listSize.Count;j++ )
                    {
                        if (j != (listSize.Count-1))
                        list[i].Description += listSize[j].Size+",";
                        else
                            list[i].Description += listSize[j].Size;
                    }
            }
            DSHangHoa_Store.DataSource = list;
            DSHangHoa_Store.DataBind();
        }
    }
}
